import request from '@/utils/request'

// 查询渠道博客列表
export function listBlog(query) {
  return request({
    url: '/wx/blog/list',
    method: 'get',
    params: query
  })
}

// 查询渠道博客详细
export function getBlog(id) {
  return request({
    url: '/wx/blog/' + id,
    method: 'get'
  })
}

// 新增渠道博客
export function addBlog(data) {
  return request({
    url: '/wx/blog',
    method: 'post',
    data: data
  })
}

// 修改渠道博客
export function updateBlog(data) {
  return request({
    url: '/wx/blog',
    method: 'put',
    data: data
  })
}

// 删除渠道博客
export function delBlog(id) {
  return request({
    url: '/wx/blog/' + id,
    method: 'delete'
  })
}

// 导出渠道博客
export function exportBlog(query) {
  return request({
    url: '/wx/blog/export',
    method: 'get',
    params: query
  })
}
